#define _CRT_SECURE_NO_WARNINGS 1
#include"SLTList.h"

void SLTTest1()
{
	STL* plist = NULL;
	SLTPushback(1, &plist);
	SLTPushback(2, &plist);
	SLTPushback(3, &plist);
	SLTPushback(4, &plist);
	SLTPushback(5, &plist);
	//SLTPushback(2, &plist);
	//SLTPushback(3, &plist);
	//SLTPushfront(2, &plist);
	//SLTPopfront(&plist);
	/*SLTPushPos(1, 7, &plist);
	SLTPushPos(0, 9, &plist);
	SLTPushPos(10, 10, &plist);*/

	//SLTPopPos(1, plist);


	//SLTPopback(&plist);
	//STL*p1 = SLTFind(plist, 2);
	//printf("%p\n", p1);

	SLTPrintf(plist);
	
}
void SLTTest2()
{
	STL* plist = NULL;
	SLTPushback(1, &plist);
	SLTPushback(2, &plist);
	SLTPushback(3, &plist);
	SLTPushback(4, &plist);
	SLTPushback(5, &plist);
	SLTPushback(6, &plist);
	SLTPushback(7, &plist);
	SLTPushback(8, &plist);
	SLTPushback(9, &plist);
	SLTPushback(10, &plist);
	STL* pos = SLTFind(plist, 2);
	SLTPushPosFront(pos, 20, &plist);
	pos = SLTFind(plist, 3);
	SLTPushPosBack(pos, 30, &plist);


	pos = SLTFind(plist, 8);

	SLTPopPos(pos, &plist);

	SLTPrintf(plist);

	SLTDestroy(&plist);


}




int main()
{
	//SLTTest1();
	SLTTest2();
	return 0;
}